package org.eztouch.sys.entity;

import org.eztouch.common.base.BaseEntity;
import org.hibernate.validator.constraints.NotEmpty;

import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;

@SuppressWarnings("serial")
@TableName("sys_dictionaries")
public class SysDic extends BaseEntity{
	@NotEmpty(message="字典类型不能为空！")
	private String dicType;
	@NotEmpty(message="字典Key不能为空！")
	private String dicKey;
	@NotEmpty(message="字典值不能为空！")
	private String dicValue;
	private Integer sortNo;
	private String ext1;
	private String ext2;
	private String ext3;
	
	@Override
	public Wrapper<SysDic> bindingQueryWrapper() {
		Wrapper<SysDic> wrapper = new EntityWrapper<SysDic>();
		return wrapper;
	}
	
	public String getDicType() {
		return dicType;
	}
	public void setDicType(String dicType) {
		this.dicType = dicType;
	}
	public String getDicKey() {
		return dicKey;
	}
	public void setDicKey(String dicKey) {
		this.dicKey = dicKey;
	}
	public String getDicValue() {
		return dicValue;
	}
	public void setDicValue(String dicValue) {
		this.dicValue = dicValue;
	}
	public Integer getSortNo() {
		return sortNo;
	}
	public void setSortNo(Integer sortNo) {
		this.sortNo = sortNo;
	}
	public String getExt1() {
		return ext1;
	}
	public void setExt1(String ext1) {
		this.ext1 = ext1;
	}
	public String getExt2() {
		return ext2;
	}
	public void setExt2(String ext2) {
		this.ext2 = ext2;
	}
	public String getExt3() {
		return ext3;
	}
	public void setExt3(String ext3) {
		this.ext3 = ext3;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + ((dicKey == null) ? 0 : dicKey.hashCode());
		result = prime * result + ((dicType == null) ? 0 : dicType.hashCode());
		result = prime * result
				+ ((dicValue == null) ? 0 : dicValue.hashCode());
		result = prime * result + ((ext1 == null) ? 0 : ext1.hashCode());
		result = prime * result + ((ext2 == null) ? 0 : ext2.hashCode());
		result = prime * result + ((ext3 == null) ? 0 : ext3.hashCode());
		result = prime * result + ((sortNo == null) ? 0 : sortNo.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		SysDic other = (SysDic) obj;
		if (dicKey == null) {
			if (other.dicKey != null)
				return false;
		} else if (!dicKey.equals(other.dicKey))
			return false;
		if (dicType == null) {
			if (other.dicType != null)
				return false;
		} else if (!dicType.equals(other.dicType))
			return false;
		if (dicValue == null) {
			if (other.dicValue != null)
				return false;
		} else if (!dicValue.equals(other.dicValue))
			return false;
		if (ext1 == null) {
			if (other.ext1 != null)
				return false;
		} else if (!ext1.equals(other.ext1))
			return false;
		if (ext2 == null) {
			if (other.ext2 != null)
				return false;
		} else if (!ext2.equals(other.ext2))
			return false;
		if (ext3 == null) {
			if (other.ext3 != null)
				return false;
		} else if (!ext3.equals(other.ext3))
			return false;
		if (sortNo == null) {
			if (other.sortNo != null)
				return false;
		} else if (!sortNo.equals(other.sortNo))
			return false;
		return true;
	}
	@Override
	public String toString() {
		return "SysDic [dicType=" + dicType + ", dicKey=" + dicKey
				+ ", dicValue=" + dicValue + ", sortNo=" + sortNo + ", ext1="
				+ ext1 + ", ext2=" + ext2 + ", ext3=" + ext3 + "]";
	}
}
